﻿Imports Microsoft.VisualBasic

Public Class DBItemSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public ItemID As New TableField("ItemID", Data.SqlDbType.Int)
    Public ItemNameAr As New TableField("ItemNameAr", Data.SqlDbType.NVarChar)
    Public ItemNameEn As New TableField("ItemNameEn", Data.SqlDbType.NVarChar)
    Public ItemDesc As New TableField("ItemDesc", Data.SqlDbType.NVarChar)
    Public Highlevel As New TableField("Highlevel", Data.SqlDbType.Int)
    Public LowLevel As New TableField("LowLevel", Data.SqlDbType.Int)
    Public ItemCatNo As New TableField("ItemCatNo", Data.SqlDbType.NVarChar)
    Public ItemStatus As New TableField("ItemStatus", Data.SqlDbType.Int)
    Public IsExpiryDate As New TableField("IsExpiryDate", Data.SqlDbType.Int)

    Sub New()
        MyBase.StoredProcedureName = "ItemSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal ItemID As String = "", _
                                 Optional ByVal ItemNameAr As String = "", _
                                 Optional ByVal ItemNameEn As String = "", _
                                 Optional ByVal ItemDesc As String = "", _
                                 Optional ByVal Highlevel As String = "", _
                                 Optional ByVal LowLevel As String = "", _
                                 Optional ByVal ItemCatNo As String = "", _
                                 Optional ByVal ItemStatus As String = "", _
                                 Optional ByVal IsExpiryDate As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.ItemID.SetValue(ItemID, MyBase.FieldsArrayList)
        Me.ItemNameAr.SetValue(ItemNameAr, MyBase.FieldsArrayList)
        Me.ItemNameEn.SetValue(ItemNameEn, MyBase.FieldsArrayList)
        Me.ItemDesc.SetValue(ItemDesc, MyBase.FieldsArrayList)
        Me.Highlevel.SetValue(Highlevel, MyBase.FieldsArrayList)
        Me.LowLevel.SetValue(LowLevel, MyBase.FieldsArrayList)
        Me.ItemCatNo.SetValue(ItemCatNo, MyBase.FieldsArrayList)
        Me.ItemStatus.SetValue(ItemStatus, MyBase.FieldsArrayList)
        Me.IsExpiryDate.SetValue(IsExpiryDate, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
